var sync_server;
var sync_username;
var sync_password;

// TODO extract to a js source file

function sync_onOpen(){
    // sync_server = detailsViewData.getValue("server");
    sync_username = null; 
    sync_password = null;			
}

function sync_editUsername(){
    sync_username = event.value;
}

function sync_editPassword(){
    sync_password = event.value;
}

function sync_alertMessage(msg){
    debug.info(msg);
}

function sync_okOnClick(){
    if(sync_username != null){			
            if(sync_password != null){			
                    //sync_server.login(sync_username, sync_password); // TODO this will be useless
                    //sync_server.sync();
                    sync_alertMessage("");
            }else{
                    sync_alertMessage("missing"); // TODO put on string.xml
            }				
    }else{
            sync_alertMessage("missing"); // TODO put on string.xml
    }
}
